<!DOCTYPE html>
<html>
<head>
    <title>ueditor</title>

    <% include comm %>

    <style>
        button {
            margin: 10px auto;
        }
    </style>

</head>
<body>
<div class="container" style="margin: 20px auto;">

    <h1><%= title %></h1>

    <script id="editor" type="text/plain" style="width:100%;height:500px;"></script>

    <div class="row">
        <div class="col-sm-12">
            <button class="btn btn-info" onclick="getAllHtml()">获得整个html的内容</button>
            <button class="btn btn-info" onclick="getContent()">获得内容</button>
            <button class="btn btn-info" onclick="setContent()">写入内容</button>
            <button class="btn btn-info" onclick="setContent(true)">追加内容</button>
            <button class="btn btn-info" onclick="getContentTxt()">获得纯文本</button>
            <button class="btn btn-info" onclick="getPlainTxt()">获得带格式的纯文本</button>
            <button class="btn btn-info" onclick="hasContent()">判断是否有内容</button>
            <button class="btn btn-info" onclick="setFocus()">使编辑器获得焦点</button>
            <button class="btn btn-info" onmousedown="isFocus(event)">编辑器是否获得焦点</button>
            <button class="btn btn-info" onmousedown="setblur(event)">编辑器失去焦点</button>


            <button class="btn btn-info" onclick="getText()">获得当前选中的文本</button>
            <button class="btn btn-info" onclick="insertHtml()">插入给定的内容</button>
            <button class="btn btn-info" id="enable" onclick="setEnabled()">可以编辑</button>
            <button class="btn btn-info" onclick="setDisabled()">不可编辑</button>
            <button class="btn btn-info" onclick=" UE.getEditor('editor').setHide()">隐藏编辑器</button>
            <button class="btn btn-info" onclick=" UE.getEditor('editor').setShow()">显示编辑器</button>
            <button class="btn btn-info" onclick=" UE.getEditor('editor').setHeight(300)">设置高度为300默认关闭了自动长高</button>


            <button class="btn btn-info" onclick="getLocalData()">获取草稿箱内容</button>
            <button class="btn btn-info" onclick="clearLocalData()">清空草稿箱</button>


            <button class="btn btn-info" onclick="createEditor()">创建编辑器</button>
            <button class="btn btn-info" onclick="deleteEditor()">删除编辑器</button>
        </div>
    </div>
</div>


<script type="text/javascript" charset="utf-8" src="/controller/ueditor.js"></script>
</body>
</html>
